package com.hadoop.mr2.multipleinput;

import java.io.IOException;

import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;

/**处理：
 * jary	math 59 english 80
   jary	math 78 english 87
   用Hadoop默认的格式读取
 */
public class InputMapper2 extends Mapper<LongWritable, Text, Text,Text>{
	
	@Override
	protected void map(LongWritable key, Text value, Mapper<LongWritable, Text, Text, Text>.Context context)
			throws IOException, InterruptedException {
		String line=value.toString();
		String[ ] data=line.split("\t");
		String name=data[0];
		String scoreInfo=data[1];
		context.write(new Text(name), new Text(scoreInfo));
				
	}

}
